package com.alipay.sdk.abcphaima.bean;

import com.alibaba.fastjson.JSONArray;

public class AbcpPageResultData {

    public boolean success;
    public String sessionId;
    public String tradeNo;
    public String authCode;
    public String barCode;
    public String title;
    public String totalAmount;
    public String paidAmount;
    public String discountAmount;
    public String subCode;
    public String subMsg;
    //支付结果页倒计时,默认20s
    public int resultTimeOut = 15;
    public JSONArray outerExtends;

    public AbcpPageResultData(PageResultData data) {
        this.sessionId = data.sessionId;
        this.tradeNo = data.tradeNo;
        this.authCode = data.authCode;
        this.barCode = data.barCode;
        this.paidAmount = data.paidAmount;
        this.totalAmount = data.totalAmount;
        this.discountAmount = data.discountAmount;
        this.success = data.success;
        if (!data.success) {
            this.subCode = data.failCode;
            this.subMsg = data.message;
        }
        this.outerExtends = data.getOuterExtends();
    }
}
